﻿project(zhilaiSDK_tool VERSION ${GLOBAL_VERSION})

# project version
MESSAGE("generating project [ " ${PROJECT_NAME} " ]")
MESSAGE("version: " ${PROJECT_VERSION})

# qt5 setttings
set(Qt5_DIR "D:\\Qt\\Qt5.10.1\\5.10.1\\msvc2015\\lib\\cmake\\Qt5")
set(QT_TS_FILE "${PROJECT_NAME}")

# set include path
include_directories(
    ${SRC_DIR}
    ${SRC_DIR}/common
    ${SRC_DIR}/common/include
    ${SRC_DIR}/common/third_party
)

if (MSVC)
    set(LIB_ZLBASE ${SRC_DIR}/common/zlbase_v2.0.7_msvc2015)
endif ()

include_directories(
    ${LIB_ZLBASE}/include
    rapidjson-1.1.0/include
)

link_directories(
    ${LIB_ZLBASE}/lib
)

include(${SRC_DIR}/cmake/version.cmake)
include(${SRC_DIR}/cmake/qt.cmake)

set(SRC_SOURCES
    "${SRC_DIR}/common/util/config.cpp"
    "main.cpp"
    "CSettingWnd.cpp"
)
set(SRC_HEADERS
    "${SRC_DIR}/common/util/config.h"
    "CSettingWnd.h"
)

add_executable(${PROJECT_NAME} 
    ${SRC_SOURCES}  
    ${SRC_HEADERS}
)
target_link_libraries(${PROJECT_NAME} zlbase)
QT5_SetTargetProperty(${PROJECT_NAME})
